﻿@model IEnumerable<MvcMSFootball.Models.Team>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

<p>*Enter <strong>Details</strong> to see the Team's Players<br /></p>

<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Won
        </th>
        <th>
            Draw
        </th>
        <th>
            Lost
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Won)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Draw)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Lost)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | 
            <strong>@Html.ActionLink("Details", "Details", new { id=item.ID })</strong> | 
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
} 

</table>
